import Vue from 'vue'
import Router from 'vue-router'
import main from '@/components/main'
import detail from '@/components/detail'
import cms from '@/components/cms'

Vue.use(Router)

// const router = new Router({
//   // base,
//   mode: 'history',
//   routes
// })
// router.beforeEach((to, from, next) => {
//   next()
// })

// export default router

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'main',
      component: main
    },
    {
      path: '/detail',
      name: 'detail',
      component: detail
    },
    {
      path: '/cms',
      name: 'cms',
      component: cms
    }
  ]
})
